<%@ page import="com.jkt.rms.commons.includes.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.jkt.rms.business.*"%>
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="/spring"%>
<html>
<head>
<SCRIPT language="javascript" type="text/javascript"> 
  function backtoSearch(k1){
	   	document.forms[0].action="resourcerole.htm?method="+k1;
	   	document.forms[0].method="post";
		document.forms[0].submit();
	}
</Script>
<title><fmt:message key="lbl.title.updateResourceRole" /></title>
</head>
<center>
<body>
<h2 id="headerbar"><fmt:message key="lbl.title.updateResourceRole" /></h2>
<div id="content">
<table width="80%" cellpadding="0" cellspacing="0">
	<c:if test="${ not empty errors.allErrors}">
		<tr valign="top" align="left">
			<td width="80%">
			<div id="errorFieldSet">
			<fieldset><legend><strong>Errors</strong></legend>
			<table width="80%" border="1" cellpadding="0" cellspacing="0">
				<c:forEach var="err" items="${errors.allErrors}">
					<spring:message code="${err.code}" arguments="${err.arguments}" />
					<br />
				</c:forEach>
				<tr>
				</tr>
			</table>
			</fieldset>
			</div>
			</td>
		</tr>
	</c:if>
	<c:if test="${ not empty resourceRole.message}">
		<tr valign="top" align="left">
			<td width="80%">
			<div id="infoFieldSet">
			<fieldset><legend><strong>Messages</strong></legend>
			<table width="80%" border="1" cellpadding="0" cellspacing="0">
				<spring:message code="${resourceRole.message}" />

			</table>
			</fieldset>
			</div>
			</td>
		</tr>
	</c:if>
	<tr valign="top" align="center">
		<td width="70%">
		<fieldset><legend><strong>Edit Role</strong></legend> <form:form
			method="POST" commandName="resourceRole" name="editRole" action="#">
			<form:hidden path="id" />
			<form:hidden path="searchMethod" />
			<form:hidden path="searchRoleName" />
			<form:hidden path="searchRoleCode" />
			<table border="0" width="80%">
				<tr>
					<td align='right'><label for="textRoleCode">Role Code:<font
						color="red">*</font></label></td>
					<td align='center'><form:input path="roleCode" maxlength="8"
						tabindex="1" title="roleCode" /></td>
					<td align='right' class=header><label for="textRoleName">Role
					Name:<font color="red">*</font></label></td>
					<td align='center' class=value><form:input path="roleName"
						tabindex="2" maxlength="200" /></td>
				</tr>
				<tr>
					<td align='right'>Role Description:</td>
					<td align="center"><form:textarea path="roleDesc" rows="4"
						cols="20" title="Role Desc" tabindex="3"/></td>
					<td colspan="1"><label>Status:</label></td>
					<td><form:select path="status" tabindex="4">
						<form:option value="Y">Active</form:option>
						<form:option value="N">InActive</form:option>
					</form:select></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="center"><input class="value" type='submit'
						name='button' tabindex="5" value='Save'
						onclick="dosubmit('resourceRole','resourcerole.htm?method=updateRole')">
					</td>
					<td align="right"><input class="value" type='submit'
						name='button' tabindex="6"
						onclick="backtoSearch('<c:out value="${resourceRole.searchMethod}"/>');"
						value='Back to Search Result'></td>
				</tr>
			</table>

		</form:form></fieldset>
		</td>
	</tr>
</table>
</div>
<table><tr><td><%@ include file="footer.jsp"%></td></tr></table>
</body>
</center>
</html>
